package com.example.shotscreen;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {

    private ImageView viewById,viewById1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        viewById = (ImageView) findViewById(R.id.iv);
        viewById1 = (ImageView) findViewById(R.id.iv_1);


    }

    public void onclick(View view) {
        Bitmap bitmap = ScreenShotUtils.shootView(viewById);
        viewById1.setImageBitmap(bitmap);
    }
}
